#ifndef MACH_H
#define MACH_H
#include <glib.h>
typedef unsigned short  target_size_t;

enum Reg {
    R_R0 = 0, R_R1, R_R2, R_R3, R_R4, R_R5,
    R_R6, R_R7, R_IR, R_PC, R_PSR, REG_NUM
};

#define MEMSZ 65536

typedef  struct MachineStatus {
    target_size_t registers[REG_NUM];
    target_size_t memory [MEMSZ];
    gboolean hlt;
} MachineStatus;

MachineStatus * machine_init ();

#endif